package com.regent.central.bill.repository.mrp.dto;

import java.math.BigDecimal;

/**
 * 物料采购单DTO
 *
 * @author 钟宝林
 * @date 2018-06-17 17:34
 **/
public class MaterialPurchaseDTO {
    /**
     * 物料采购单ID
     */
    private String billMaterialPurchaseId;
    /**
     * 工单ID, 如果是计划外采购这个字段不用管(一般设置为空字符串)
     */
    private String facMissionId;
    /**
     * 物料skuID
     */
    private String commonMaterialsSkuId;
    /**
     * 本单到料
     */
    private BigDecimal quantityArrivePurchase = BigDecimal.ZERO;

    /**
     * 采购单号
     */
    private String orderNo;
    /**
     * 创建日期
     */
    private String dateCreated;
    /**
     * 采购日期
     */
    private String datePurchase;
    /**
     * 物料供应商ID
     */
    private String supplierId;
    /**
     * 预计货期
     */
    private String expectDateEnd;
    /**
     * 采购员ID
     */
    private String creatorId;
    /**
     * 采购员名称
     */
    private String creatorName;

    // --------- 以下为物料信息 ---------
    /**
     * 冗余成衣款号
     */
    private String styleNo;

    /**
     * 冗余物料ID
     */
    private String commonMaterialsId;

    /**
     * 冗余物料款号
     */
    private String commonMaterialsNo;

    /**
     * 采购数量
     */
    private BigDecimal quantity;

    /**
     * 物料单价
     */
    private BigDecimal priceUnit;

    /**
     * 采购总价
     */
    private BigDecimal priceTotal;

    /**
     * 采购类型  0: 按工单bom需求采购 1: 计划外采购
     */
    private Integer type;
    /**
     * 到料状态
     *  ("未到料", 0),
     *  ("未到齐", 1),
     *  ("已到齐", 2);
     */
    private Integer arriveStatus;
    /**
     * 到料状态改变类型
     */
    private Integer arriveStatusChangeType;
    private Integer cancel;  // 撤销标记 0：未撤销； 1：已撤销

    public BigDecimal getQuantityArrivePurchase() {
        return quantityArrivePurchase;
    }

    public void setQuantityArrivePurchase(BigDecimal quantityArrivePurchase) {
        this.quantityArrivePurchase = quantityArrivePurchase;
    }

    public String getBillMaterialPurchaseId() {
        return billMaterialPurchaseId;
    }

    public void setBillMaterialPurchaseId(String billMaterialPurchaseId) {
        this.billMaterialPurchaseId = billMaterialPurchaseId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(String supplierId) {
        this.supplierId = supplierId;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public String getFacMissionId() {
        return facMissionId;
    }

    public void setFacMissionId(String facMissionId) {
        this.facMissionId = facMissionId;
    }

    public String getStyleNo() {
        return styleNo;
    }

    public void setStyleNo(String styleNo) {
        this.styleNo = styleNo;
    }

    public String getCommonMaterialsId() {
        return commonMaterialsId;
    }

    public void setCommonMaterialsId(String commonMaterialsId) {
        this.commonMaterialsId = commonMaterialsId;
    }

    public String getCommonMaterialsNo() {
        return commonMaterialsNo;
    }

    public void setCommonMaterialsNo(String commonMaterialsNo) {
        this.commonMaterialsNo = commonMaterialsNo;
    }

    public String getCommonMaterialsSkuId() {
        return commonMaterialsSkuId;
    }

    public void setCommonMaterialsSkuId(String commonMaterialsSkuId) {
        this.commonMaterialsSkuId = commonMaterialsSkuId;
    }

    public String getDateCreated() {
        return dateCreated;
    }

    public void setDateCreated(String dateCreated) {
        this.dateCreated = dateCreated;
    }

    public String getDatePurchase() {
        return datePurchase;
    }

    public void setDatePurchase(String datePurchase) {
        this.datePurchase = datePurchase;
    }

    public String getExpectDateEnd() {
        return expectDateEnd;
    }

    public void setExpectDateEnd(String expectDateEnd) {
        this.expectDateEnd = expectDateEnd;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(BigDecimal priceUnit) {
        this.priceUnit = priceUnit;
    }

    public BigDecimal getPriceTotal() {
        return priceTotal;
    }

    public void setPriceTotal(BigDecimal priceTotal) {
        this.priceTotal = priceTotal;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getArriveStatus() {
        return arriveStatus;
    }

    public void setArriveStatus(Integer arriveStatus) {
        this.arriveStatus = arriveStatus;
    }

    public Integer getArriveStatusChangeType() {
        return arriveStatusChangeType;
    }

    public void setArriveStatusChangeType(Integer arriveStatusChangeType) {
        this.arriveStatusChangeType = arriveStatusChangeType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MaterialPurchaseDTO that = (MaterialPurchaseDTO) o;

        if (billMaterialPurchaseId != null ? !billMaterialPurchaseId.equals(that.billMaterialPurchaseId) : that.billMaterialPurchaseId != null)
            return false;
        if (facMissionId != null ? !facMissionId.equals(that.facMissionId) : that.facMissionId != null) return false;
        return commonMaterialsSkuId != null ? commonMaterialsSkuId.equals(that.commonMaterialsSkuId) : that.commonMaterialsSkuId == null;
    }

    public Integer getCancel() {
        return cancel;
    }

    public void setCancel(Integer cancel) {
        this.cancel = cancel;
    }

    @Override
    public int hashCode() {
        int result = billMaterialPurchaseId != null ? billMaterialPurchaseId.hashCode() : 0;
        result = 31 * result + (facMissionId != null ? facMissionId.hashCode() : 0);
        result = 31 * result + (commonMaterialsSkuId != null ? commonMaterialsSkuId.hashCode() : 0);
        return result;
    }
}
